Integrand size = 27, antiderivative size = 111 \[ \int \frac {A+B x}{x^2 \left (a^2+2 a b x+b^2 x^2\right )^2} \, dx=-\frac {A}{a^4 x}-\frac {A b-a B}{3 a^2 (a+b x)^3}-\frac {2 A b-a B}{2 a^3 (a+b x)^2}-\frac {3 A b-a B}{a^4 (a+b x)}-\frac {(4 A b-a B) \log (x)}{a^5}+\frac {(4 A b-a B) \log (a+b x)}{a^5} \]
-A/a^4/x+1/3*(-A*b+B*a)/a^2/(b*x+a)^3+1/2*(-2*A*b+B*a)/a^3/(b*x+a)^2+(-3*A *b+B*a)/a^4/(b*x+a)-(4*A*b-B*a)*ln(x)/a^5+(4*A*b-B*a)*ln(b*x+a)/a^5
Time = 0.05 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.92 \[ \int \frac {A+B x}{x^2 \left (a^2+2 a b x+b^2 x^2\right )^2} \, dx=\frac {-\frac {6 a A}{x}+\frac {2 a^3 (-A b+a B)}{(a+b x)^3}+\frac {3 a^2 (-2 A b+a B)}{(a+b x)^2}+\frac {6 a (-3 A b+a B)}{a+b x}+6 (-4 A b+a B) \log (x)+6 (4 A b-a B) \log (a+b x)}{6 a^5} \]
((-6*a*A)/x + (2*a^3*(-(A*b) + a*B))/(a + b*x)^3 + (3*a^2*(-2*A*b + a*B))/ (a + b*x)^2 + (6*a*(-3*A*b + a*B))/(a + b*x) + 6*(-4*A*b + a*B)*Log[x] + 6 *(4*A*b - a*B)*Log[a + b*x])/(6*a^5)
Time = 0.31 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {1184, 27, 86, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {A+B x}{x^2 \left (a^2+2 a b x+b^2 x^2\right )^2} \, dx\) |
\(\Big \downarrow \) 1184 |
\(\displaystyle b^4 \int \frac {A+B x}{b^4 x^2 (a+b x)^4}dx\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \int \frac {A+B x}{x^2 (a+b x)^4}dx\) |
\(\Big \downarrow \) 86 |
\(\displaystyle \int \left (\frac {a B-4 A b}{a^5 x}-\frac {b (a B-4 A b)}{a^5 (a+b x)}-\frac {b (a B-3 A b)}{a^4 (a+b x)^2}+\frac {A}{a^4 x^2}-\frac {b (a B-2 A b)}{a^3 (a+b x)^3}-\frac {b (a B-A b)}{a^2 (a+b x)^4}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {\log (x) (4 A b-a B)}{a^5}+\frac {(4 A b-a B) \log (a+b x)}{a^5}-\frac {3 A b-a B}{a^4 (a+b x)}-\frac {A}{a^4 x}-\frac {2 A b-a B}{2 a^3 (a+b x)^2}-\frac {A b-a B}{3 a^2 (a+b x)^3}\) |
-(A/(a^4*x)) - (A*b - a*B)/(3*a^2*(a + b*x)^3) - (2*A*b - a*B)/(2*a^3*(a + b*x)^2) - (3*A*b - a*B)/(a^4*(a + b*x)) - ((4*A*b - a*B)*Log[x])/a^5 + (( 4*A*b - a*B)*Log[a + b*x])/a^5
3.7.40.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_ .), x_] :> Int[ExpandIntegrand[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && ((ILtQ[n, 0] && ILtQ[p, 0]) || EqQ[p, 1 ] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))
Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_.)*((a_) + (b_.)*(x_ ) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[1/c^p Int[(d + e*x)^m*(f + g*x )^n*(b/2 + c*x)^(2*p), x], x] /; FreeQ[{a, b, c, d, e, f, g, m, n}, x] && E qQ[b^2 - 4*a*c, 0] && IntegerQ[p]
Time = 0.16 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.95
method | result | size |
default | \(-\frac {A}{a^{4} x}+\frac {\left (-4 A b +B a \right ) \ln \left (x \right )}{a^{5}}-\frac {2 A b -B a}{2 a^{3} \left (b x +a \right )^{2}}-\frac {3 A b -B a}{a^{4} \left (b x +a \right )}+\frac {\left (4 A b -B a \right ) \ln \left (b x +a \right )}{a^{5}}-\frac {A b -B a}{3 a^{2} \left (b x +a \right )^{3}}\) | \(106\) |
norman | \(\frac {-\frac {A}{a}+\frac {3 b \left (4 A b -B a \right ) x^{2}}{a^{3}}+\frac {3 b^{2} \left (12 A b -3 B a \right ) x^{3}}{2 a^{4}}+\frac {b^{3} \left (44 A b -11 B a \right ) x^{4}}{6 a^{5}}}{x \left (b x +a \right )^{3}}+\frac {\left (4 A b -B a \right ) \ln \left (b x +a \right )}{a^{5}}-\frac {\left (4 A b -B a \right ) \ln \left (x \right )}{a^{5}}\) | \(113\) |
risch | \(\frac {-\frac {b^{2} \left (4 A b -B a \right ) x^{3}}{a^{4}}-\frac {5 b \left (4 A b -B a \right ) x^{2}}{2 a^{3}}-\frac {11 \left (4 A b -B a \right ) x}{6 a^{2}}-\frac {A}{a}}{x \left (b^{2} x^{2}+2 a b x +a^{2}\right ) \left (b x +a \right )}-\frac {4 \ln \left (x \right ) A b}{a^{5}}+\frac {\ln \left (x \right ) B}{a^{4}}+\frac {4 \ln \left (-b x -a \right ) A b}{a^{5}}-\frac {\ln \left (-b x -a \right ) B}{a^{4}}\) | \(138\) |
parallelrisch | \(-\frac {6 B \ln \left (b x +a \right ) x^{4} a \,b^{3}-72 A \ln \left (b x +a \right ) x^{3} a \,b^{3}+18 B \ln \left (b x +a \right ) x^{3} a^{2} b^{2}-72 a^{2} A \,b^{2} x^{2}-108 a A \,b^{3} x^{3}-44 A \,b^{4} x^{4}-24 A \ln \left (b x +a \right ) x^{4} b^{4}-6 B \,a^{4} \ln \left (x \right ) x +6 B \ln \left (b x +a \right ) x \,a^{4}+24 A \ln \left (x \right ) x^{4} b^{4}+6 A \,a^{4}+11 x^{4} B \,b^{3} a +27 x^{3} B \,a^{2} b^{2}+18 x^{2} B \,a^{3} b -72 A \ln \left (b x +a \right ) x^{2} a^{2} b^{2}+18 B \ln \left (b x +a \right ) x^{2} a^{3} b -24 A \ln \left (b x +a \right ) x \,a^{3} b +24 A \ln \left (x \right ) x \,a^{3} b -6 B \ln \left (x \right ) x^{4} a \,b^{3}+72 A \ln \left (x \right ) x^{2} a^{2} b^{2}-18 B \ln \left (x \right ) x^{2} a^{3} b +72 A \ln \left (x \right ) x^{3} a \,b^{3}-18 B \ln \left (x \right ) x^{3} a^{2} b^{2}}{6 a^{5} x \left (b^{2} x^{2}+2 a b x +a^{2}\right ) \left (b x +a \right )}\) | \(324\) |
-A/a^4/x+(-4*A*b+B*a)/a^5*ln(x)-1/2*(2*A*b-B*a)/a^3/(b*x+a)^2-(3*A*b-B*a)/ a^4/(b*x+a)+(4*A*b-B*a)*ln(b*x+a)/a^5-1/3*(A*b-B*a)/a^2/(b*x+a)^3
Leaf count of result is larger than twice the leaf count of optimal. 267 vs. \(2 (102) = 204\).
Time = 0.27 (sec) , antiderivative size = 267, normalized size of antiderivative = 2.41 \[ \int \frac {A+B x}{x^2 \left (a^2+2 a b x+b^2 x^2\right )^2} \, dx=-\frac {6 \, A a^{4} - 6 \, {\left (B a^{2} b^{2} - 4 \, A a b^{3}\right )} x^{3} - 15 \, {\left (B a^{3} b - 4 \, A a^{2} b^{2}\right )} x^{2} - 11 \, {\left (B a^{4} - 4 \, A a^{3} b\right )} x + 6 \, {\left ({\left (B a b^{3} - 4 \, A b^{4}\right )} x^{4} + 3 \, {\left (B a^{2} b^{2} - 4 \, A a b^{3}\right )} x^{3} + 3 \, {\left (B a^{3} b - 4 \, A a^{2} b^{2}\right )} x^{2} + {\left (B a^{4} - 4 \, A a^{3} b\right )} x\right )} \log \left (b x + a\right ) - 6 \, {\left ({\left (B a b^{3} - 4 \, A b^{4}\right )} x^{4} + 3 \, {\left (B a^{2} b^{2} - 4 \, A a b^{3}\right )} x^{3} + 3 \, {\left (B a^{3} b - 4 \, A a^{2} b^{2}\right )} x^{2} + {\left (B a^{4} - 4 \, A a^{3} b\right )} x\right )} \log \left (x\right )}{6 \, {\left (a^{5} b^{3} x^{4} + 3 \, a^{6} b^{2} x^{3} + 3 \, a^{7} b x^{2} + a^{8} x\right )}} \]
-1/6*(6*A*a^4 - 6*(B*a^2*b^2 - 4*A*a*b^3)*x^3 - 15*(B*a^3*b - 4*A*a^2*b^2) *x^2 - 11*(B*a^4 - 4*A*a^3*b)*x + 6*((B*a*b^3 - 4*A*b^4)*x^4 + 3*(B*a^2*b^ 2 - 4*A*a*b^3)*x^3 + 3*(B*a^3*b - 4*A*a^2*b^2)*x^2 + (B*a^4 - 4*A*a^3*b)*x )*log(b*x + a) - 6*((B*a*b^3 - 4*A*b^4)*x^4 + 3*(B*a^2*b^2 - 4*A*a*b^3)*x^ 3 + 3*(B*a^3*b - 4*A*a^2*b^2)*x^2 + (B*a^4 - 4*A*a^3*b)*x)*log(x))/(a^5*b^ 3*x^4 + 3*a^6*b^2*x^3 + 3*a^7*b*x^2 + a^8*x)
Leaf count of result is larger than twice the leaf count of optimal. 204 vs. \(2 (95) = 190\).
Time = 0.41 (sec) , antiderivative size = 204, normalized size of antiderivative = 1.84 \[ \int \frac {A+B x}{x^2 \left (a^2+2 a b x+b^2 x^2\right )^2} \, dx=\frac {- 6 A a^{3} + x^{3} \left (- 24 A b^{3} + 6 B a b^{2}\right ) + x^{2} \left (- 60 A a b^{2} + 15 B a^{2} b\right ) + x \left (- 44 A a^{2} b + 11 B a^{3}\right )}{6 a^{7} x + 18 a^{6} b x^{2} + 18 a^{5} b^{2} x^{3} + 6 a^{4} b^{3} x^{4}} + \frac {\left (- 4 A b + B a\right ) \log {\left (x + \frac {- 4 A a b + B a^{2} - a \left (- 4 A b + B a\right )}{- 8 A b^{2} + 2 B a b} \right )}}{a^{5}} - \frac {\left (- 4 A b + B a\right ) \log {\left (x + \frac {- 4 A a b + B a^{2} + a \left (- 4 A b + B a\right )}{- 8 A b^{2} + 2 B a b} \right )}}{a^{5}} \]
(-6*A*a**3 + x**3*(-24*A*b**3 + 6*B*a*b**2) + x**2*(-60*A*a*b**2 + 15*B*a* *2*b) + x*(-44*A*a**2*b + 11*B*a**3))/(6*a**7*x + 18*a**6*b*x**2 + 18*a**5 *b**2*x**3 + 6*a**4*b**3*x**4) + (-4*A*b + B*a)*log(x + (-4*A*a*b + B*a**2 - a*(-4*A*b + B*a))/(-8*A*b**2 + 2*B*a*b))/a**5 - (-4*A*b + B*a)*log(x + (-4*A*a*b + B*a**2 + a*(-4*A*b + B*a))/(-8*A*b**2 + 2*B*a*b))/a**5
Time = 0.23 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.21 \[ \int \frac {A+B x}{x^2 \left (a^2+2 a b x+b^2 x^2\right )^2} \, dx=-\frac {6 \, A a^{3} - 6 \, {\left (B a b^{2} - 4 \, A b^{3}\right )} x^{3} - 15 \, {\left (B a^{2} b - 4 \, A a b^{2}\right )} x^{2} - 11 \, {\left (B a^{3} - 4 \, A a^{2} b\right )} x}{6 \, {\left (a^{4} b^{3} x^{4} + 3 \, a^{5} b^{2} x^{3} + 3 \, a^{6} b x^{2} + a^{7} x\right )}} - \frac {{\left (B a - 4 \, A b\right )} \log \left (b x + a\right )}{a^{5}} + \frac {{\left (B a - 4 \, A b\right )} \log \left (x\right )}{a^{5}} \]
-1/6*(6*A*a^3 - 6*(B*a*b^2 - 4*A*b^3)*x^3 - 15*(B*a^2*b - 4*A*a*b^2)*x^2 - 11*(B*a^3 - 4*A*a^2*b)*x)/(a^4*b^3*x^4 + 3*a^5*b^2*x^3 + 3*a^6*b*x^2 + a^ 7*x) - (B*a - 4*A*b)*log(b*x + a)/a^5 + (B*a - 4*A*b)*log(x)/a^5
Time = 0.28 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.10 \[ \int \frac {A+B x}{x^2 \left (a^2+2 a b x+b^2 x^2\right )^2} \, dx=\frac {{\left (B a - 4 \, A b\right )} \log \left ({\left | x \right |}\right )}{a^{5}} - \frac {{\left (B a b - 4 \, A b^{2}\right )} \log \left ({\left | b x + a \right |}\right )}{a^{5} b} - \frac {6 \, A a^{4} - 6 \, {\left (B a^{2} b^{2} - 4 \, A a b^{3}\right )} x^{3} - 15 \, {\left (B a^{3} b - 4 \, A a^{2} b^{2}\right )} x^{2} - 11 \, {\left (B a^{4} - 4 \, A a^{3} b\right )} x}{6 \, {\left (b x + a\right )}^{3} a^{5} x} \]
(B*a - 4*A*b)*log(abs(x))/a^5 - (B*a*b - 4*A*b^2)*log(abs(b*x + a))/(a^5*b ) - 1/6*(6*A*a^4 - 6*(B*a^2*b^2 - 4*A*a*b^3)*x^3 - 15*(B*a^3*b - 4*A*a^2*b ^2)*x^2 - 11*(B*a^4 - 4*A*a^3*b)*x)/((b*x + a)^3*a^5*x)
Time = 9.88 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.06 \[ \int \frac {A+B x}{x^2 \left (a^2+2 a b x+b^2 x^2\right )^2} \, dx=\frac {2\,\mathrm {atanh}\left (\frac {2\,b\,x}{a}+1\right )\,\left (4\,A\,b-B\,a\right )}{a^5}-\frac {\frac {A}{a}+\frac {11\,x\,\left (4\,A\,b-B\,a\right )}{6\,a^2}+\frac {b^2\,x^3\,\left (4\,A\,b-B\,a\right )}{a^4}+\frac {5\,b\,x^2\,\left (4\,A\,b-B\,a\right )}{2\,a^3}}{a^3\,x+3\,a^2\,b\,x^2+3\,a\,b^2\,x^3+b^3\,x^4} \]